package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Keeper;
import com.ruoyi.common.core.domain.entity.ReportKeeper;
import com.ruoyi.system.mapper.ReportKeeperMapper;
import com.ruoyi.system.service.ReportKeepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ReportKeepServiceImpl implements ReportKeepService {
    @Autowired
    ReportKeeperMapper reportKeeperMapper;
    @Override
    public List<ReportKeeper> selectKeepList(ReportKeeper reportKeeper) {
        return reportKeeperMapper.selectList(reportKeeper);
    }

    @Override
    public List<ReportKeeper> selectAll(ReportKeeper reportKeeper) {
        return  reportKeeperMapper.selectAll(reportKeeper);
    }

    @Override
    public ReportKeeper selectById(Long id) {
        return  reportKeeperMapper.selectById(id);
    }

    @Override
    public Boolean createKeep(ReportKeeper keeper) {
        return reportKeeperMapper.insert(keeper) == 1;
    }

    @Override
    public Boolean updateKeep(ReportKeeper reportKeeper) {
        return reportKeeperMapper.update(reportKeeper) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return reportKeeperMapper.deleteById(id) == 1;
    }

}
